#include "facecapture.h"

#include <QDebug>
#include <QFile>
#include <QPainter>
#include <QProcess>
#include <QUrl>

FaceCapture::FaceCapture()
{
    resourcePath = QDir(QDir::currentPath().append("/../Resources/login/"));
}

void FaceCapture::takePicture(QString fileName) {
    QProcess script(this);
    script.setWorkingDirectory(resourcePath.absolutePath());
    script.start("./screenshot "+fileName);
    script.waitForFinished();
}
